/*   1:    */ package org.jetbrains.lang.manifest.highlighting;
/*   2:    */ 
/*   3:    */

import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElementVisitor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.lang.manifest.ManifestBundle;
import org.jetbrains.lang.manifest.header.HeaderNameMatch;
import org.jetbrains.lang.manifest.header.HeaderParserRepository;
import org.jetbrains.lang.manifest.psi.Header;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */
/*  15:    */
/*  16:    */
/*  17:    */
/*  18:    */
/*  19:    */
/*  20:    */ 
/*  21:    */ public class MisspelledHeaderInspection
/*  22:    */   extends LocalInspectionTool
/*  23:    */ {
/*  24:    */   private static final int a = 10;
/*  25:    */   private HeaderParserRepository b;
/*  26:    */   
/*  27:    */   public MisspelledHeaderInspection()
/*  28:    */   {
/*  29: 50 */     this.b = HeaderParserRepository.getInstance();
/*  30:    */   }
/*  31:    */   
/*  32:    */   @NotNull
/*  33:    */   public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder paramProblemsHolder, boolean paramBoolean)
/*  34:    */   {
/*  35: 56 */     if (paramProblemsHolder == null) {
/*  36: 56 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection", "buildVisitor" }));
/*  37:    */     }
/*  38: 56 */     void tmp49_46 = new PsiElementVisitor();
/*  39: 56 */     if (tmp49_46 == null) {
/*  40: 56 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection", "buildVisitor" }));
/*  41:    */     }
/*  42: 56 */     return tmp49_46;
/*  43:    */   }
/*  44:    */   
/*  45:    */   private static class HeaderNameSpellingQuickFix
/*  46:    */     implements LocalQuickFix
/*  47:    */   {
/*  48:    */     private final Header a;
/*  49:    */     private final String b;
/*  50:    */     
/*  51:    */     HeaderNameSpellingQuickFix(Header paramHeader, HeaderNameMatch paramHeaderNameMatch, MisspelledHeaderInspection.1 param1)
/*  52:    */     {
/*  53: 80 */       this(paramHeader, paramHeaderNameMatch);
/*  54:    */     }
/*  55:    */     
/*  56:    */     private HeaderNameSpellingQuickFix(Header paramHeader, HeaderNameMatch paramHeaderNameMatch)
/*  57:    */     {
/*  58: 85 */       this.a = paramHeader;
/*  59: 86 */       this.b = paramHeaderNameMatch.getHeaderName();
/*  60:    */     }
/*  61:    */     
/*  62:    */     @NotNull
/*  63:    */     public String getName()
/*  64:    */     {
/*  65: 92 */       String tmp16_13 = ManifestBundle.message("inspection.header.fix", new Object[] { this.b });
/*  66: 92 */       if (tmp16_13 == null) {
/*  67: 92 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection$HeaderNameSpellingQuickFix", "getName" }));
/*  68:    */       }
/*  69: 92 */       return tmp16_13;
/*  70:    */     }
/*  71:    */     
/*  72:    */     @NotNull
/*  73:    */     public String getFamilyName()
/*  74:    */     {
/*  75: 98 */       String tmp9_6 = ManifestBundle.message("inspection.group", new Object[0]);
/*  76: 98 */       if (tmp9_6 == null) {
/*  77: 98 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection$HeaderNameSpellingQuickFix", "getFamilyName" }));
/*  78:    */       }
/*  79: 98 */       return tmp9_6;
/*  80:    */     }
/*  81:    */     
/*  82:    */     public void applyFix(@NotNull Project paramProject, @NotNull ProblemDescriptor paramProblemDescriptor)
/*  83:    */     {
/*  84:103 */       if (paramProject == null) {
/*  85:103 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection$HeaderNameSpellingQuickFix", "applyFix" }));
/*  86:    */       }
/*  87:103 */       if (paramProblemDescriptor == null) {
/*  88:103 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/lang/manifest/highlighting/MisspelledHeaderInspection$HeaderNameSpellingQuickFix", "applyFix" }));
/*  89:    */       }
/*  90:103 */       this.a.setName(this.b);
/*  91:    */     }
/*  92:    */   }
/*  93:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.lang.manifest.highlighting.MisspelledHeaderInspection

 * JD-Core Version:    0.7.0.1

 */